<?php
class newsViewModel extends viewModel {
    public $table = "news";
    public $view = array(
        "category" => array(
            "type" => "inner",
            "field"=>"catid,cname,pid,htmldir,listhtml,archtml,islisthtml,isarchtml",
            "on" => "news.catid = category.catid"
        ),
        "user" => array(
            "type" => "inner",
            "on" => "news.uid = user.uid"
        ),
        "news_data" => array(
            "type" => "inner",
            "on" => "news.id = news_data.nid",
        )
    );
}
?>